#ifndef __SKELETONANIM_H__
#define __SKELETONANIM_H__	//


#include <AntTweakBar.h>

#include "Application.h"

#include "AnimatedChain.h"
#include "BarEdition.h"

class BarEdition;
class SkeletonAnim: public Application
{
public:
	SkeletonAnim();

	~SkeletonAnim(){}

	bool OnInit();

	void OnRender();

	void OnRelease();

	void ComputeChain(double t);
	void ComputeChain(Joint * j);

	void calculTangente(unsigned int pos,float &x, float &y, float &z);


	void changeBVH();
	void changeCam();

    static void TW_CALL saveBvh(void * self);

	double time;	// enlapsed time
	double tpstot;
	bool running;
	double start;
	double stop;
    double speed;
    float quat[4];

    InfoChain::MovDir typeDir;
    InfoChain::MovState movState;

    char * filename;

    std::vector<std::string> listbvh;
    int fileid;

protected:

	float	m_angleX, m_angleY, m_angleZ;

    //int wire			;	// Draw model in wireframe?
    //float *cubeColor	;	// Model color (32bits RGBA)
    std::string bvhdirectorie;
    std::string bvhdirectorieout;
    int fileidcur;
    float quatcur[4];
    AnimatedChain * chain;

	BarEdition * m_bar;

	void savebvh();

};


#endif // __TPAnimation_H__ fin de la routine
